import { Injectable } from '@angular/core';
import { ServiceBasic } from 'src/kalend';
import { Http } from '@angular/http';

@Injectable()
export class MenuService extends ServiceBasic {

  constructor(http: Http) {
    super('/menu', http);
  }
  create(doc: any) {
    return this.httppost(`/create`, doc);
  }
  update(doc: any) {
    return this.httppost(`/update`, doc);
  }
  delete(id: any) {
    return this.httpget(`/delete/${id}`);
  }
  queryById(id: any) {
    return this.httpget(`/queryById/${id}`);
  }
  queryTree() {
    return this.httpget(`/queryTree`);
  }
}
